package com.example.yinzradio.project;

import org.springframework.stereotype.Service;

import java.applet.Applet;
import java.applet.AudioClip;
import java.io.File;

@Service
public class RadiaoService {
    public void play(String path){
        File file = new File(path);

        try{
            AudioClip audioClip = Applet.newAudioClip(file.toURI().toURL());
            audioClip.play();
        }
        catch ( Exception e){
            e.printStackTrace();
        }
    }
}
